<tagLib name="html" />

<include file="Public:header" />

<div class="container" id="cpcontainer">
   <div class="itemtitle">
        <h3>{$Think.lang.newsletter.manage_newsletter}</h3>
        <ul class="tab1">
            <li><a href="__URL__/newsletterList"><span>{$Think.lang.newsletter.all_newsletter}</span></a></li>
            <li class="current"><notempty name="rs"><a href="__URL__/editNewsletter/letter_id/{$rs.letter_id}"><span>{$Think.lang.newsletter.edit_newsletter}</span></a><else/><a href="__URL__/addNewsletter"><span>{$Think.lang.newsletter.add_newsletter}</span></a></notempty></li>
            <li><a href="__URL__/newsletterQueue"><span>{$Think.lang.newsletter.newsletter_queue}</span></a></li>
        </ul>
    </div>
    <form id="cpform" name="cpform" method="post" action="__URL__/editNewsletter">
    <input type="hidden" name="op" value="save" />
    <input type="hidden" name="letter_id" value="{$rs.letter_id}" />
    <table class="tb tb2">
        <tr class="nobg"><td colspan="2" class="td27">{$Think.lang.newsletter.target_group}: <input class="checkbox" name="chkall" onclick="checkAll('prefix', this.form, 'target_group', 'chkall', true)" type="checkbox" id="chkallgroups" /><label for="chkallgroups"> {$Think.lang.check_all}</td></tr>
        <tr>
            <td class="vtop rowform">
                <ul onmouseover="altStyle(this);">
                    <volist name="userGroupList" id="vo">
                    <li style="width:150px;padding:3px 0px;"><input class="checkbox" type="checkbox" name="target_group[]" value="{$vo.group_id}" <in name="vo.group_id" value="$rs.target_group">checked="checked" disabled="disabled"</in> />{$vo.name}&nbsp;<span class="count">({$vo.group_id|get_group_user_count})</span></li>
                    </volist>
                </ul>
            </td>
            <td class="vtop tips2"></td>
        </tr>
        <tr class="nobg"><td colspan="2" class="td27">{$Think.lang.newsletter.subject}:</td></tr>
        <tr>
            <td class="vtop rowform"><input class="txt400" name="subject" value="{$rs.subject}" /></td>
            <td class="vtop tips2"></td>
        </tr>
        <tr class="nobg"><td colspan="2" class="td27">{$Think.lang.newsletter.message}:</td></tr>
        <tr>
            <td colspan="2"><html:markitup mode="bbcode" id="message" name="message" content="{$rs.message}" /></td>
        </tr>
        <tr class="nobg"><td colspan="2" class="td27">{$Think.lang.newsletter.priority}:</td></tr>
        <tr>
            <td class="vtop rowform"><html:select name="priority" options="priorityOptions" selected="prioritySelected" /></td>
            <td class="vtop tips2"></td>
        </tr>
        <tr class="nobg"><td colspan="15"><div class="fixsel"><input id="save" class="btn" type="submit" value="{$Think.lang.submit}" /></div></td></tr>
    </table>
    </form>
</div>

<script type="text/javascript">
$(function(){

});
</script>

<include file="Public:footer" />
